package com.todo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigInteger;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("m_history_list")
public class Message implements Serializable {

    /**
     * 主键id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private BigInteger id;

    /**
     * 用户uid
     */
    private String uid;

    /**
     * 团队tid
     */
    private String tid;

    /**
     * 好友uid
     */
    private String fUid;

    /**
     * 当前最新一条消息id
     */
    private BigInteger mNowInfo;

    /**
     * 当前最新消息的接收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime mNewTime;

    /**
     * 是否置顶
     */
    private boolean isTop;

}
